* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    height: 100vh;
    width: 100vw;
    display: flex;
}

.container .left {
    flex: 1;
    border: 1px solid #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    color: red;
    background-color: grey;
    transition: all 1s ease-in-out;
}

.container .right {
    flex: 1;
    border: 1px solid #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    color: blue;
    background-color: rosybrown;
    transition: all 1s ease-in-out;
}

.container .left-active{
    flex:2;
    transition: flex 1s ease-in-out;
}

.container .right-active {
    flex: 2;
    transition: flex 1s ease-in-out;
}